// vite.config.ts
import vue from "file:///D:/vue/images/node_modules/.pnpm/@vitejs+plugin-vue@5.1.2_vite@5.4.1_@types+node@20.14.15_sass@1.77.8__vue@3.4.38_typescript@5.4.5_/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///D:/vue/images/node_modules/.pnpm/@vitejs+plugin-vue-jsx@4.0.1_vite@5.4.1_@types+node@20.14.15_sass@1.77.8__vue@3.4.38_typescript@5.4.5_/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "file:///D:/vue/images/node_modules/.pnpm/vite@5.4.1_@types+node@20.14.15_sass@1.77.8/node_modules/vite/dist/node/index.js";
import vueDevTools from "file:///D:/vue/images/node_modules/.pnpm/vite-plugin-vue-devtools@7.3.8_rollup@4.20.0_vite@5.4.1_@types+node@20.14.15_sass@1.77.8__vue@3.4.38_typescript@5.4.5_/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
import viteCompression from "file:///D:/vue/images/node_modules/.pnpm/vite-plugin-compression@0.5.1_vite@5.4.1_@types+node@20.14.15_sass@1.77.8_/node_modules/vite-plugin-compression/dist/index.mjs";
import progress from "file:///D:/vue/images/node_modules/.pnpm/vite-plugin-progress@0.0.7_vite@5.4.1_@types+node@20.14.15_sass@1.77.8_/node_modules/vite-plugin-progress/dist/index.mjs";
import ViteRestart from "file:///D:/vue/images/node_modules/.pnpm/vite-plugin-restart@0.4.1_vite@5.4.1_@types+node@20.14.15_sass@1.77.8_/node_modules/vite-plugin-restart/dist/index.js";
import svgLoader from "file:///D:/vue/images/node_modules/.pnpm/vite-svg-loader@5.1.0_vue@3.4.38_typescript@5.4.5_/node_modules/vite-svg-loader/index.js";
import { visualizer } from "file:///D:/vue/images/node_modules/.pnpm/rollup-plugin-visualizer@5.12.0_rollup@4.20.0/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
import { ViteImageOptimizer } from "file:///D:/vue/images/node_modules/.pnpm/vite-plugin-image-optimizer@1.1.8_vite@5.4.1_@types+node@20.14.15_sass@1.77.8_/node_modules/vite-plugin-image-optimizer/dist/index.mjs";
var __vite_injected_original_import_meta_url = "file:///D:/vue/images/vite.config.ts";
var vite_config_default = defineConfig({
  server: {
    host: "0.0.0.0",
    cors: true,
    port: 3345,
    // 前缀
    proxy: {
      "/api": {
        target: "http://www.example.com",
        changeOrigin: true,
        // 前缀重写
        rewrite: (path) => path.replace(/^\/api/, "api")
      }
    }
  },
  plugins: [
    vue(),
    vueJsx(),
    vueDevTools(),
    viteCompression({
      verbose: true,
      disable: false,
      deleteOriginFile: false,
      threshold: 10240,
      algorithm: "gzip",
      ext: ".gz"
    }),
    progress(),
    ViteRestart({
      restart: ["*.config.[jt]s", "**/config/*.[jt]s", "*.config.cjs"]
    }),
    svgLoader({
      defaultImport: "url",
      // or 'raw'
      svgo: true
    }),
    visualizer({
      open: true,
      gzipSize: true,
      brotliSize: true
    }),
    // px2rem({
    //   width: 750, // 设计稿宽度
    //   rootFontSize: 16 // 根字体大小
    // }),
    ViteImageOptimizer()
  ],
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
    }
  },
  css: {
    // 预加载
    preprocessorOptions: {
      // 全局样式变量预注入
      scss: {
        additionalData: `
        @use "./src/styles/variables.scss" as *;
        @use "./src/styles/mixin.scss" as *;`,
        javascriptEnabled: true
      }
    }
  },
  build: {
    // 10kb 以下，转 Base64
    assetsInlineLimit: 1024 * 10,
    // chunkSizewarningLimit : 1500 //配置文件大小限制，默认 500
    rollupOptions: {
      output: {
        // 每个node_modules 模块分成一个 js 文件
        manualChunks(id) {
          if (id.includes("node_modules")) {
            return id.toString().split("node_modules/.pnpm/")[1].split("/")[0].toString();
          }
          return void 0;
        },
        // 用于从入口点创建的快的打包输出[name]表示文件名，[hash]表示该文件内容hash值
        entryFileNames: "assets/js/[name].[hash].js",
        // 用于命名代码拆分时创建的共享快的输出命名
        chunkFileNames: "assets/js/[name].[hash].js",
        // 用于输出静态资源的命名，[ext] 表示文件扩展名
        assetFileNames: "asstes/[ext]/[name].[hash].[ext]"
      }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFx2dWVcXFxcaW1hZ2VzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJEOlxcXFx2dWVcXFxcaW1hZ2VzXFxcXHZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9EOi92dWUvaW1hZ2VzL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHZ1ZSBmcm9tICdAdml0ZWpzL3BsdWdpbi12dWUnXHJcbmltcG9ydCB2dWVKc3ggZnJvbSAnQHZpdGVqcy9wbHVnaW4tdnVlLWpzeCdcclxuaW1wb3J0IHsgZmlsZVVSTFRvUGF0aCwgVVJMIH0gZnJvbSAnbm9kZTp1cmwnXHJcbmltcG9ydCB7IGRlZmluZUNvbmZpZyB9IGZyb20gJ3ZpdGUnXHJcbmltcG9ydCB2dWVEZXZUb29scyBmcm9tICd2aXRlLXBsdWdpbi12dWUtZGV2dG9vbHMnXHJcbmltcG9ydCB2aXRlQ29tcHJlc3Npb24gZnJvbSAndml0ZS1wbHVnaW4tY29tcHJlc3Npb24nXHJcbmltcG9ydCBwcm9ncmVzcyBmcm9tICd2aXRlLXBsdWdpbi1wcm9ncmVzcydcclxuaW1wb3J0IFZpdGVSZXN0YXJ0IGZyb20gJ3ZpdGUtcGx1Z2luLXJlc3RhcnQnXHJcbmltcG9ydCBzdmdMb2FkZXIgZnJvbSAndml0ZS1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